/*----------------------------------------------------------------------------
 * osObjects.h: CMSIS-RTOS global object definitions for an application
 *----------------------------------------------------------------------------
 *
 * This header file defines global RTOS objects used throughout a project
 *
 * #define osObjectsPublic indicates that objects are defined; without that
 * definition the objects are defined as external symbols.
 *
 *--------------------------------------------------------------------------*/


#ifndef __osObjects
#define __osObjects


#ifdef osObjectsCreat
#define OBJ_EXT  
#else
#define OBJ_EXT extern 
#endif

#include "RTX_Config.h" 
#include "cmsis_os.h"               // CMSIS RTOS header file

#define ms_ticks(x)        (x*OS_TICK_FREQ/1000)

// global 'thread' functions ---------------------------------------------------

int Init_Thread (void);

OBJ_EXT osThreadId  tid_SysTask;                                  // thread id
OBJ_EXT osThreadId  tid_UsbTask;                                  // thread id
OBJ_EXT osThreadId  tid_mbTask;                                  // thread id
OBJ_EXT osThreadId  tid_FlashTask;                                  // thread id

// global 'semaphores' ----------------------------------------------------------

OBJ_EXT osMutexId mid_eep;
OBJ_EXT osMutexId mid_q25;

// global 'message queues' -------------------------------------------------------


// global 'mail queues' ----------------------------------------------------------


#endif  // __osObjects
